Why does max-width behave counter intuitively on columns in a table? [migrated]
Posted
by
Nate
on Pro Webmasters
See other posts from Pro Webmasters
or by Nate
Published on 2012-11-27T23:37:16Z
Indexed on
2012/11/28
5:28 UTC
Read the original article
Hit count: 553
Basically, I have a stretchy table, I want my label column to be fixed width and my data column to be dynamically sized. My inclination would be to set the max-width
via CSS on my label column. However, this has the opposite effect. I've created a jsfiddle that replicates this. (Re-size the window to see the left column dynamically sized and the right column fixed size)
On my own site, I see the same behavior and it happens in IE and Chrome.
If I switch it, and set max-width
on the data column, everything behaves as I want, but it feels backwards to me. Am I doing something wrong here?
© Pro Webmasters or respective owner